home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4409 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.cencom.net!ns!tanp
  2. From: tanp@ns (Bill Wendling)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: "Initializer must be a constant expression"...?
  5. Date: 4 Feb 1996 06:15:09 GMT
  6. Organization: Cen-Com Internet
  7. Message-ID: <4f1itd$oio@news.cencom.net>
  8. References: <311280AA.15FB7483@tulsa.lgc.com>
  9. NNTP-Posting-Host: ns.cencom.net
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Glenn Carr inexplicably wrote:
  13.  
  14. } in the following...
  15.  
  16. }     typedef struct {
  17. }         char          **var;
  18. }         char           *descr;
  19. }     } cfgStrSpec_t;
  20.  
  21. }     char           *pszDepCodeSetKey = NULL;
  22. }     char           *pszDepComboBox = NULL;
  23. }     char           *pszShowAllIfEmpty = NULL;
  24. }     cfgStrSpec_t    pCfgStr[] =
  25. }     {
  26. } 244:    {&pszDepCodeSetKey, "Dependent code_set_key"},
  27. } 245:    {&pszDepComboBox, "Dependent widget (combobox)"},
  28. } 246:    {&pszShowAllIfEmpty, "Boolean (nonzero or 0)"},
  29. }         {NULL, NULL},
  30. }     };
  31.  
  32. } Is that not valid, or ANSI C?
  33.  
  34. It seems that xlc doesn't like the psz's being used as initializers.
  35. I don't know why, perhaps you should go back to gcc? :)
  36.  
  37. --
  38. Bill Wendling         | "Pinky, are you thinking what I'm thinking?"
  39. tanp@ns.cencom.net  | "I think so, Brain, but burlap chafes me so."
  40. "Boom Shanka"       | Finger me for my Geek Code...NOW!
  41.